function Player(_name, _image) {
	var name = _name;
	var image = _image;
	var cash = 100;
	var controlCash = cash;
	var bet = 0;
	var inGame = true;
	var inRound = true;
	var betting = true;
	var hand = new Array(2);
	var nrOfCards = 0;
	
	this.getName = function () {
		return name;
	};
	
	this.getImage = function () {
		return image;
	};
	
	this.getCash = function () {
		return cash;
	};
	
	this.getAssets = function () {
		return controlCash;
	};
	
	this.getBet = function () {
		return bet;
	};
	
	this.getHand = function () {
		return hand;
	};
	
	this.isInGame = function () {
		return inGame;
	};
	
	this.isInRound = function () {
		return inRound;
	};
	
	this.isBetting = function () {
		return betting;
	};
	
	this.lose = function () {
		inRound = false;
	}
	
	this.leave = function () {
		inGame = false;
		controlCash = 0;
		cash = 0;
		bet = "";
	};
	
	this.addCard = function (newCard) {
		if (nrOfCards >= 2) {
			alert("Funky stuff happening with " + name + "'s cards!");
			return;
		};
		
		hand[nrOfCards] = newCard;
		nrOfCards++;
	};
	
	this.makeBet = function (proposedBet) {
		if (proposedBet < 0 || proposedBet >= controlCash) {
			alert("Funky stuff happening with " + name + "'s bets!");
			return;
		}
		
		bet = proposedBet;
		cash = controlCash - proposedBet;
	};
	
	this.allin = function () {
		betting = false;
		bet = controlCash;
		cash = 0;
	};
	
	this.fold = function () {
		inRound = false;
		betting = false;
		nrOfCards = 0;
		hand[0] = null;
		hand[1] = null;
	};
	
	this.collectWinnings = function (winnings) {
		if (winnings < 0) {
			alert("Funky stuff happening with " + name + "'s winnings!");
			return;
		}
		
		cash += winnings;
	};
	
	this.reset = function () {
		if (inGame) {
			inRound = true;
			betting = true;
			controlCash = cash;
			bet = 0;
		}
	};
}